fix(@angular/cli): ignore system files in service worker - #7340
fix(@angular/cli): ignore system files in service worker#7340cyrilletuzi wants to merge 2 commits into
Conversation
Related to angular/mobile-toolkit#180 When copying the assets, the CLI includes system files (e.g. .DS_Store and Thumbs.db). As a consequence, they are included in the service worker manifest as files to cache. But such file may (and should) not be deployed to the server, then a file will be missing, then the service worker installation will fail and so all the offline feature won't work. This PR makes the CLI ensure the service worker will ignore these system files.
|
Maybe ignore all files that begin with a dot? Not sure what else there would be but I don't think any of them should be included ever :) |
|
I'm not sure the angular/service-worker API permits to remove patterns from the ignore field, so it may be not a good idea to include too much things, as special user cases could be blocked. And as we are in the CLI, it's the CLI itself who chooses which files will be generated, so there should be no risk for other files. |
|
@alxhub can you have a look please? |
|
Will this be part of the finalization of service-worker in Angular 5 and CLI complete automation of PWA ? |
|
Can we also have the capability to exclude certain files from the build? "static.ignore": [ |
|
Closed in favor of angular/devkit#263 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Related to angular/mobile-toolkit#180
When copying the assets, the CLI includes system files (e.g. .DS_Store and Thumbs.db). As a consequence, they are included in the service worker manifest as files to cache. But such file may (and should) not be deployed to the server, then a file will be missing, then the service worker installation will fail and so all the offline feature won't work.
This PR makes the CLI ensure the service worker will ignore these system files.